home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Collections: Purity
/
Purity #34 (1994-08)(Diesel)(DE)[WB].zip
/
Purity #34 (1994-08)(Diesel)(DE)[WB].adf
/
AppIcon
/
AppIcon2.p
< prev
next >
Wrap
Text File
|
1994-08-06
|
3KB
|
115 lines
{ Proramm: AppIcon2
Version: 0.04
Datum: 16.06.94
Sprache: KickPascal 2.12/OS2-Includes
Sinn: Programm zeigt wie man ein eigenes AppIcon auf der WB
programmiert und wie man mit selbigen arbeitet
Autor: PackMAN
c/o Falk Zühlsdorff
Lindenberg 66
D-98693 Ilmenau/Thüringen
©: Routinen:- FREEWARE wenn Name des Autors im Info-
fenster angegeben ist und selbigem das
Programm zugesendet wird.
Image: - Icon für "CD pro" darf nicht weiter-
veröffentlicht wird.
Kommentar: nur für Purity-Pascal-PD-Serie }
PROGRAM appicon2;
USES EXEC;
{$INCL 'dos.lib',
'workbench/startup.h',
'workbench/workbench.h',
'icon.lib',
'wb.lib'}
TYPE ifeld=array[1..24] of long; {für Image}
VAR dobj : p_DiskObject;
pjobj : DiskObject;
myPort : p_MsgPort;
MyAppIcon : p_AppIcon;
AppMsg : p_AppMessage;
ex : boolean;
Gad : Gadget;
Image1 : Image;
idat1 : ^ifeld;
BEGIN
IconBase:=OpenLibrary('icon.library',37);
IF IconBase<>NIL
THEN
BEGIN
workbenchbase:=OpenLibrary('workbench.library',37);
IF workbenchbase<>NIL
THEN
BEGIN
idat1:=ptr(alloc_mem(sizeof(ifeld),2)); {Chip}
idat1^:=ifeld(
%000000000000000000000000000000,
%000000000000000000000011100000,
%000000000000000000000111110000,
%000000000100000000000111100000,
%000000000110000000000100000000,
%000000000101000000000100000000,
%000000000101000000000100000000,
%000000000100000000000100000000,
%000000000100000000000100000000,
%000000111000000000000100000000,
%000001111100000000000000000000,
%000000111000000000000000000000,
%000000000000000000000000000000,
%000000000000000001000000000000,
%000000000000000001100000000000,
%000000000000000001010000000000,
%000000000000000001010000000000,
%000000000000000001000000000000,
%000000000000000001000000000000,
%000000000000001110000000000000,
%000000000000011111000000000000,
%000000000000001110000000000000,
%000000000000000000000000000000,
%000000000000000000000000000000);
Image1:=image(0,0,32,24,1,idat1,1,2,nil);
Gad:=Gadget(NIL,50,50,32,25,GADGIMAGE+GADGIMAGE,GADGIMMEDIATE+
RELVERIFY,BOOLGADGET,^Image1,NIL,NIL,0,NIl,0,NIL);
pjobj:=diskobject(WB_DISKMAGIC,WB_DISKVERSION,Gad,WBAPPICON,
NIL,NIL,NO_ICON_POSITION,NO_ICON_POSITION,
NIL,NIL,4000);
dobj:=^pjobj;
ex:=false;
myport:=CreateMsgPort;
myappicon:=AddAppIconA(0,0,'PackMANs_AppIcon',myport,NIL,dobj,NIL);
{IF myAppIcon<>NIL
THEN writeln('AppIcon on the WBScreen');}
REPEAT
AppMsg:=wait_port(myport);
AppMsg:=get_msg(myport);
Reply_Msg(AppMsg);
IF AppMsg^.am_NumArgs=0
THEN ex:=true; {Doppelklick/aktiv}
UNTIL ex;
ex:=RemoveAppIcon(myAppIcon);
DeleteMsgPort(myport);
END;
END;
END.